{% extends "base.html" %} {% load staticfiles %}
{% block title %} 登录|老鑫头の个人博客 {% endblock title %}

{% block content %}
    <div class="container">
        <div class="row">
            <div class="col-12" style="text-align: center">
                <br>
                <br>
                <br>
                <h5>还没有账号？</h5>
                <h5>点击<a href='{% url "userprofile:register" %}'>注册账号</a>加入我们吧！</h5>
                <br>
                <form method="post" action=".">
                    {% csrf_token %}
                    <!-- 账号 -->
                    <div class="form-group col-md-4" style="margin:0 auto;">
                        <label for="username">账号</label>
                        <input type="text" style="text-align: center" class="form-control" id="username"
                               name="username">
                    </div>
                    <br/>
                    <!-- 密码 -->
                    <div class="form-group col-md-4" style="margin:0 auto;">
                        <label for="password">密码</label>
                        <input type="password"
                               style="text-align: center"
                               class="form-control" id="password"
                               name="password">
                    </div>
                    <br/>
                    <!-- 提交按钮 -->
                    <button type="submit"
                            class="btn btn-danger">登录
                    </button>
                </form>
                {% if messages %}
                    <script>
                        {% for msg in messages %}
                            alert('{{ msg.message }}');
                        {% endfor %}
                    </script>
                {% endif %}

                <!-- 密码重置 -->
                <br>
                <h5>忘记密码了？</h5>
                <h5>点击<a href='{% url "password_reset_recover" %}'>这里</a>重置密码</h5>
            </div>
        </div>
    </div>


{% endblock content %}